package com.qianfeng.myannotationdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import com.qianfeng.myannotationdemo.annotation.ContenView;
import com.qianfeng.myannotationdemo.annotation.ViewInject;
import com.qianfeng.myannotationdemo.annotation.ViewInjectImpl;

@ContenView(value = R.layout.activity_main)
public class MainActivity extends AppCompatActivity {
    @ViewInject(R.id.tv)
    private TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.activity_main);
//        textView = (TextView) findViewById(R.id.tv);
        //  setContentView(R.layout.activity_main);
        ViewInjectImpl.getInstance().inject(this);
        textView.setText("使用注解后的内容");
    }

}
